package com.skyjing.askit

import java.io.Closeable
import java.io.IOException

/**
 * 文件操作
 */
object AsFile {

    /**
     * 关闭IO
     *
     * @param closeables closeable
     */
    @JvmStatic
    fun closeIO(vararg closeables: Closeable?) {
        if (closeables == null) {
            return
        }
        try {
            for (closeable in closeables) {
                closeable?.close()
            }
        } catch (e: IOException) {
            e.printStackTrace()
        }
    }
}